﻿using AutoMapper;
using ProductManagement.Domain.Dtos;
using ProductManagement.Domain.ProductsDomain;

namespace ProductManagement.Dtos
{
    /// <summary>
    /// AutoMapper专用
    /// </summary>
    public class AreaProFiles : Profile
    {
        public AreaProFiles()
        {
            //产品分类新增dto映射
            CreateMap<ProductType,ProductTypeCreateDto>().ReverseMap();
            //产品分类修改dto映射
            CreateMap<ProductType, ProductsTypeUpdateDto>().ReverseMap();
            //产品添加映射
            CreateMap<Product, ProductCreateDto>().ReverseMap();
            //产品修改映射
            CreateMap<Product, ProductUpdateDto>().ReverseMap();
            //消息新增
            CreateMap<Message, MessageCreateDtos>().ReverseMap();
        }
    }
}
